package com.andy.blog.dal.service;

import com.andy.blog.dal.domain.ArticleDO;
import com.andy.blog.dal.domain.ArticleTagInfoDO;
import com.andy.blog.dal.vo.ArticleVO;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * Created by andy on 2023/6/22 18:39
 */
public interface ArticleDalService {

    /**
     * 分页查询
     */
    IPage<ArticleDO> selectListByPage(ArticleVO articleVO);

    /**
     * 分页查询
     */
    IPage<ArticleDO> listByPage(ArticleVO articleVO);

    /**
     * 根据条件查询
     */
    List<ArticleDO> selectList(ArticleVO articleVO);

    /**
     * 新增
     */
    Long addArticle(ArticleVO articleVO);

    /**
     * 根据id查询
     */
    ArticleDO selectById(Long id);

    /**
     * 修改
     */
    void updateById(ArticleDO articleDO);

    /**
     * 查看文章详情信息
     */
    ArticleTagInfoDO selectArticleHomeById(Long articleId);

    /**
     * 查询文章数
     */
    Long selectArticleCount(ArticleVO articleVO);

    /**
     * 校验文章是否存在
     */
    boolean checkArticleExist(Long articleId);
}
